package com.ruiysoft.controller.mdse.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * SkuVo
 */
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2018-11-24T14:21:05.161+08:00")

public class SkuVo   {
  @JsonProperty("skuId")
  private Long skuId = null;

  @JsonProperty("costPrice")
  private String costPrice = null;

  @JsonProperty("unitPrice")
  private String unitPrice = null;

  @JsonProperty("listPrice")
  private String listPrice = null;

  @JsonProperty("quantity")
  private Integer quantity = null;

  @JsonProperty("photos")
  @Valid
  private List<SkuPhoto> photos = new ArrayList<SkuPhoto>();

  @JsonProperty("RuleValues")
  @Valid
  private List<RuleValueVo> ruleValues = null;

  @JsonProperty("delFlag")
  private Integer delFlag = null;

  public SkuVo skuId(Long skuId) {
    this.skuId = skuId;
    return this;
  }

  /**
   * Get skuId
   * @return skuId
  **/
  @ApiModelProperty(example = "1", value = "")


  public Long getSkuId() {
    return skuId;
  }

  public void setSkuId(Long skuId) {
    this.skuId = skuId;
  }

  public SkuVo costPrice(String costPrice) {
    this.costPrice = costPrice;
    return this;
  }

  /**
   * 成本价
   * @return costPrice
  **/
  @ApiModelProperty(example = "1", value = "成本价")


  public String getCostPrice() {
    return costPrice;
  }

  public void setCostPrice(String costPrice) {
    this.costPrice = costPrice;
  }

  public SkuVo unitPrice(String unitPrice) {
    this.unitPrice = unitPrice;
    return this;
  }

  /**
   * 销售价
   * @return unitPrice
  **/
  @ApiModelProperty(example = "1", required = true, value = "销售价")
  @NotNull


  public String getUnitPrice() {
    return unitPrice;
  }

  public void setUnitPrice(String unitPrice) {
    this.unitPrice = unitPrice;
  }

  public SkuVo listPrice(String listPrice) {
    this.listPrice = listPrice;
    return this;
  }

  /**
   * 市场价
   * @return listPrice
  **/
  @ApiModelProperty(example = "1", value = "市场价")


  public String getListPrice() {
    return listPrice;
  }

  public void setListPrice(String listPrice) {
    this.listPrice = listPrice;
  }

  public SkuVo quantity(Integer quantity) {
    this.quantity = quantity;
    return this;
  }

  /**
   * 库存
   * @return quantity
  **/
  @ApiModelProperty(example = "1", value = "库存")


  public Integer getQuantity() {
    return quantity;
  }

  public void setQuantity(Integer quantity) {
    this.quantity = quantity;
  }

  public SkuVo photos(List<SkuPhoto> photos) {
    this.photos = photos;
    return this;
  }

  public SkuVo addPhotosItem(SkuPhoto photosItem) {
    this.photos.add(photosItem);
    return this;
  }

  /**
   * sku图片
   * @return photos
  **/
  @ApiModelProperty(required = true, value = "sku图片")
  @NotNull

  @Valid

  public List<SkuPhoto> getPhotos() {
    return photos;
  }

  public void setPhotos(List<SkuPhoto> photos) {
    this.photos = photos;
  }

  public SkuVo ruleValues(List<RuleValueVo> ruleValues) {
    this.ruleValues = ruleValues;
    return this;
  }

  public SkuVo addRuleValuesItem(RuleValueVo ruleValuesItem) {
    if (this.ruleValues == null) {
      this.ruleValues = new ArrayList<RuleValueVo>();
    }
    this.ruleValues.add(ruleValuesItem);
    return this;
  }

  /**
   * sku对应规格
   * @return ruleValues
  **/
  @ApiModelProperty(value = "sku对应规格")

  @Valid

  public List<RuleValueVo> getRuleValues() {
    return ruleValues;
  }

  public void setRuleValues(List<RuleValueVo> ruleValues) {
    this.ruleValues = ruleValues;
  }

  public SkuVo delFlag(Integer delFlag) {
    this.delFlag = delFlag;
    return this;
  }

  /**
   * 删除状态（0，已删除，1，未删除）
   * @return delFlag
  **/
  @ApiModelProperty(required = true, value = "删除状态（0，已删除，1，未删除）")
  @NotNull


  public Integer getDelFlag() {
    return delFlag;
  }

  public void setDelFlag(Integer delFlag) {
    this.delFlag = delFlag;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SkuVo skuVo = (SkuVo) o;
    return Objects.equals(this.skuId, skuVo.skuId) &&
        Objects.equals(this.costPrice, skuVo.costPrice) &&
        Objects.equals(this.unitPrice, skuVo.unitPrice) &&
        Objects.equals(this.listPrice, skuVo.listPrice) &&
        Objects.equals(this.quantity, skuVo.quantity) &&
        Objects.equals(this.photos, skuVo.photos) &&
        Objects.equals(this.ruleValues, skuVo.ruleValues) &&
        Objects.equals(this.delFlag, skuVo.delFlag);
  }

  @Override
  public int hashCode() {
    return Objects.hash(skuId, costPrice, unitPrice, listPrice, quantity, photos, ruleValues, delFlag);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class SkuVo {\n");

    sb.append("    skuId: ").append(toIndentedString(skuId)).append("\n");
    sb.append("    costPrice: ").append(toIndentedString(costPrice)).append("\n");
    sb.append("    unitPrice: ").append(toIndentedString(unitPrice)).append("\n");
    sb.append("    listPrice: ").append(toIndentedString(listPrice)).append("\n");
    sb.append("    quantity: ").append(toIndentedString(quantity)).append("\n");
    sb.append("    photos: ").append(toIndentedString(photos)).append("\n");
    sb.append("    ruleValues: ").append(toIndentedString(ruleValues)).append("\n");
    sb.append("    delFlag: ").append(toIndentedString(delFlag)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}

